package base.utils.date;

import base.utils.PrintUtils;

public class TimeDemo {

    //1954-04-19T00:00:00
    static String time01 = "2018-08-09T16:40:30";
    static String time02 = "2018-08-09 16:40:30";
    static String time03 = "2021年10月21日";
    static String time04 = "2021年10月22日";

    public static void main(String[] args) {

        getToday();

//        Date date1 = TimeAndDateUtils.dateStringToDate(time03, DateTypeEnum.YYYYMMDD_ZH);
//
//        int month = TimeAndDateUtils.getMonth(date1);
//
//        System.out.println("  月份：   " + month);
//
//        String dateString01 = TimeChangeDateFormatUtils.changeDateStringFormat(time01, DateTypeEnum.YYYYMMDD_HHMMSS);
//
//        System.out.println(dateString01);

//        String todayString = DateUtils.getTodayDateString(DateTypeEnum.YYYYMMDD_ZH);
//        PrintUtils.print(todayString);

//        boolean isToday = DateUtils.dateIsToday(time04 , DateTypeEnum.YYYYMMDD_ZH);
//
//
//        boolean isYesterday = DateUtils.dateIsYesterday(time03 , DateTypeEnum.YYYYMMDD_ZH);
//
//        PrintUtils.print(time04  + " = " + isToday + " ; " + time03 +" 是昨天 ？？" + isYesterday );

    }

    private static void getToday(){
        String todayStr = DateUtils.getTodayDateString(DateTypeEnum.YYYYMMDD);
        String weekString = DateUtils.getWeekDateString(todayStr , DateTypeEnum.YYYYMMDD);
        String timeString = DateUtils.getTodayDateString(DateTypeEnum.HHMM);
        boolean isToday = DateUtils.dateIsToday(todayStr , DateTypeEnum.YYYYMMDD);
        PrintUtils.print(todayStr + " ; isToday = " + isToday +";" +weekString +"; time = " +timeString);
    }










}
